package com.itheima.health.dao;

import com.itheima.health.pojo.CheckItem;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 2024/7/4-17:51
 * 功能:
 */
public interface CheckItemMapper {
//    @Select("select * from t_checkitem")
    List<CheckItem> findAll(String condition);
    @Delete("delete from t_checkitem where id =#{id}")
    Boolean delete(Integer id);
    @Select("select * from t_checkitem where id =#{id}")
    CheckItem select(Integer id);

    void edit(CheckItem checkItem);
    @Select("select * from t_checkitem where id in (select checkitem_id from t_checkgroup_checkitem where checkgroup_id = #{gid});")
    List<CheckItem> findByGroupId(int gid);
}
